<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewPropertyTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewPropertyLabel_idProperty}"/>
                    <h:outputText value="#{propertyController.selected.idProperty}" title="#{bundle.ViewPropertyTitle_idProperty}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_address}"/>
                    <h:outputText value="#{propertyController.selected.address}" title="#{bundle.ViewPropertyTitle_address}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_address2}"/>
                    <h:outputText value="#{propertyController.selected.address2}" title="#{bundle.ViewPropertyTitle_address2}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_postcode}"/>
                    <h:outputText value="#{propertyController.selected.postcode}" title="#{bundle.ViewPropertyTitle_postcode}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_numberBedroom}"/>
                    <h:outputText value="#{propertyController.selected.numberBedroom}" title="#{bundle.ViewPropertyTitle_numberBedroom}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_numberBathroom}"/>
                    <h:outputText value="#{propertyController.selected.numberBathroom}" title="#{bundle.ViewPropertyTitle_numberBathroom}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_garden}"/>
                    <h:outputText value="#{propertyController.selected.garden}" title="#{bundle.ViewPropertyTitle_garden}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_furniture}"/>
                    <h:outputText value="#{propertyController.selected.furniture}" title="#{bundle.ViewPropertyTitle_furniture}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_sizeSquareMetre}"/>
                    <h:outputText value="#{propertyController.selected.sizeSquareMetre}" title="#{bundle.ViewPropertyTitle_sizeSquareMetre}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_description}"/>
                    <h:outputText value="#{propertyController.selected.description}" title="#{bundle.ViewPropertyTitle_description}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_ownerUsername}"/>
                    <h:outputText value="#{propertyController.selected.ownerUsername}" title="#{bundle.ViewPropertyTitle_ownerUsername}"/>
                    <h:outputText value="#{bundle.ViewPropertyLabel_agentUsername}"/>
                    <h:outputText value="#{propertyController.selected.agentUsername}" title="#{bundle.ViewPropertyTitle_agentUsername}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{propertyController.destroyAndView}" value="#{bundle.ViewPropertyDestroyLink}"/>
                <br />
                <br />
                <h:commandLink action="Edit" value="#{bundle.ViewPropertyEditLink}"/>
                <br />
                <h:commandLink action="#{propertyController.prepareCreate}" value="#{bundle.ViewPropertyCreateLink}" />
                <br />
                <h:commandLink action="#{propertyController.prepareList}" value="#{bundle.ViewPropertyShowAllLink}"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.ViewPropertyIndexLink}" action="/index" immediate="true" />

            </h:form>
        </ui:define>
    </ui:composition>

</html>
